﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemCenterSoa.DtoModel.Common;
using SystemCenterSoa.IRepository.SystemSettings.InstituTions;
using SystemCenterSoa.PoModel.SystemSettings.InstituTions;

namespace SystemCenterSoa.Service.SystemSettings.InstituTions
{
    public class DepartmentService: BaseService
    {
        private IDepartmentRepository _departmentRepository;
        public DepartmentService(IDepartmentRepository departmentRepository)
        {
            _departmentRepository = departmentRepository;
        }
        public List<DepartmentOfTypePo> BindDepType()
        {
            return _departmentRepository.BindDepType();
        }
        public PagerResult<DepartmentOfManagementPo> SearchPage(SearchModel searchModel)
        {
            return _departmentRepository.SearchPage(searchModel);
        }
        public bool DepartmentAdd(DepartmentOfManagementPo view)
        {
            return _departmentRepository.DepartmentAdd(view);
        }
        public DepartmentOfManagementPo GetDepartmentById(int id)
        {
            return _departmentRepository.GetDepartmentById(id);
        }
        public bool DepartmentUpdate(DepartmentOfManagementPo view)
        {
            return _departmentRepository.DepartmentUpdate(view);
        }
        public bool DepartmentUpdateById(int id)
        {
            return _departmentRepository.DepartmentUpdateById(id);
        }
        public bool DepartmentDelete(string ids)
        {
            return _departmentRepository.DepartmentDelete(ids);
        }
    }
}
